package com.test.nio;

import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;

class ShowFileList {

    public static void main(String[] args) throws IOException {
        Path initPath = Paths.get("D:\\tmp");
        Files.walkFileTree(initPath, new SimpleFileVisitor<Path>() {

            @Override
            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
                    throws IOException {
                System.out.println(file.getFileName().toString());
                return FileVisitResult.CONTINUE;
            }

        });

        Long log = 120L;
        byte[] bt = "张三".getBytes("UTF-8");

        String s = new String(bt,"UTF-8");
        System.out.println(s);
    }
}